package com.ourteam.system.dao;

/**
 * Template Name : DAO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Aug 18 15:51:23 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:20
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.lang.StringUtils;


public class SysResource implements java.io.Serializable {
    private long id;

    /**
     * Attribute id Be Seted Falg
     */
    private boolean idSetted = false;

    /**
    * Attribute id is Null Falg
    */
    private boolean idNull = false;
    private long domainId;

    /**
     * Attribute domainId Be Seted Falg
     */
    private boolean domainIdSetted = false;

    /**
    * Attribute domainId is Null Falg
    */
    private boolean domainIdNull = false;
    private long parentResourceId;

    /**
     * Attribute parentResourceId Be Seted Falg
     */
    private boolean parentResourceIdSetted = false;

    /**
    * Attribute parentResourceId is Null Falg
    */
    private boolean parentResourceIdNull = false;
    private String remarks;

    /**
     * Attribute remarks Be Seted Falg
     */
    private boolean remarksSetted = false;

    /**
    * Attribute remarks is Null Falg
    */
    private boolean remarksNull = false;
    private String resourceCode;

    /**
     * Attribute resourceCode Be Seted Falg
     */
    private boolean resourceCodeSetted = false;

    /**
    * Attribute resourceCode is Null Falg
    */
    private boolean resourceCodeNull = false;
    private String resourceName;

    /**
     * Attribute resourceName Be Seted Falg
     */
    private boolean resourceNameSetted = false;

    /**
    * Attribute resourceName is Null Falg
    */
    private boolean resourceNameNull = false;
    private long resourceTypeId;

    /**
     * Attribute resourceTypeId Be Seted Falg
     */
    private boolean resourceTypeIdSetted = false;

    /**
    * Attribute resourceTypeId is Null Falg
    */
    private boolean resourceTypeIdNull = false;
    private String status;

    /**
     * Attribute status Be Seted Falg
     */
    private boolean statusSetted = false;

    /**
    * Attribute status is Null Falg
    */
    private boolean statusNull = false;
    private int sort;

    /**
     * Attribute sort Be Seted Falg
     */
    private boolean sortSetted = false;

    /**
    * Attribute sort is Null Falg
    */
    private boolean sortNull = false;
    private String resourceTitleKey;

    /**
     * Attribute resourceTitleKey Be Seted Falg
     */
    private boolean resourceTitleKeySetted = false;

    /**
    * Attribute resourceTitleKey is Null Falg
    */
    private boolean resourceTitleKeyNull = false;
    private String domainTitleKey;

    /**
     * Attribute domainTitleKey Be Seted Falg
     */
    private boolean domainTitleKeySetted = false;

    /**
    * Attribute domainTitleKey is Null Falg
    */
    private boolean domainTitleKeyNull = false;

    public SysResource() {
        super();
    }

    /**
         * Get id
         *
         * @return long
         */
    final public long getId() {
        return id;
    }

    /**
     * Set id
     *
     * @param long
     */
    final public void setId(long id) {
        this.id = id;

        this.idSetted = true;

        this.setIdNull(false);
    }

    /**
     * Get id Has Been Setted
     *
     * @return boolean
     */
    final public boolean isIdSetted() {
        return this.idSetted;
    }

    /**
     * Set id Null
     *
     */
    final public void setIdNull() {
        this.idNull = true;
    }

    final public void setIdNull(boolean aNullFlag) {
        this.idNull = aNullFlag;
    }

    final public boolean isIdNull() {
        return this.idNull;
    }

    /**
         * Get domainId
         *
         * @return long
         */
    final public long getDomainId() {
        return domainId;
    }

    /**
     * Set domainId
     *
     * @param long
     */
    final public void setDomainId(long domainId) {
        this.domainId = domainId;

        this.domainIdSetted = true;

        this.setDomainIdNull(false);
    }

    /**
     * Get domainId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isDomainIdSetted() {
        return this.domainIdSetted;
    }

    /**
     * Set domainId Null
     *
     */
    final public void setDomainIdNull() {
        this.domainIdNull = true;
    }

    final public void setDomainIdNull(boolean aNullFlag) {
        this.domainIdNull = aNullFlag;
    }

    final public boolean isDomainIdNull() {
        return this.domainIdNull;
    }

    /**
         * Get parentResourceId
         *
         * @return long
         */
    final public long getParentResourceId() {
        return parentResourceId;
    }

    /**
     * Set parentResourceId
     *
     * @param long
     */
    final public void setParentResourceId(long parentResourceId) {
        this.parentResourceId = parentResourceId;

        this.parentResourceIdSetted = true;

        this.setParentResourceIdNull(false);
    }

    /**
     * Get parentResourceId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isParentResourceIdSetted() {
        return this.parentResourceIdSetted;
    }

    /**
     * Set parentResourceId Null
     *
     */
    final public void setParentResourceIdNull() {
        this.parentResourceIdNull = true;
    }

    final public void setParentResourceIdNull(boolean aNullFlag) {
        this.parentResourceIdNull = aNullFlag;
    }

    final public boolean isParentResourceIdNull() {
        return this.parentResourceIdNull;
    }

    /**
         * Get remarks
         *
         * @return String
         */
    final public String getRemarks() {
        if (isRemarksNull()) {
            return null;
        } else {
            return StringUtils.trim(remarks);
        }
    }

    /**
     * Set remarks
     *
     * @param String
     */
    final public void setRemarks(String remarks) {
        this.remarks = StringUtils.trim(remarks);

        this.remarksSetted = true;

        this.setRemarksNull(this.remarks == null);
    }

    /**
     * Get remarks Has Been Setted
     *
     * @return boolean
     */
    final public boolean isRemarksSetted() {
        return this.remarksSetted;
    }

    /**
     * Set remarks Null
     *
     */
    final public void setRemarksNull() {
        this.remarksNull = true;
    }

    final public void setRemarksNull(boolean aNullFlag) {
        this.remarksNull = aNullFlag;
    }

    final public boolean isRemarksNull() {
        return this.remarksNull;
    }

    /**
         * Get resourceCode
         *
         * @return String
         */
    final public String getResourceCode() {
        if (isResourceCodeNull()) {
            return null;
        } else {
            return StringUtils.trim(resourceCode);
        }
    }

    /**
     * Set resourceCode
     *
     * @param String
     */
    final public void setResourceCode(String resourceCode) {
        this.resourceCode = StringUtils.trim(resourceCode);

        this.resourceCodeSetted = true;

        this.setResourceCodeNull(this.resourceCode == null);
    }

    /**
     * Get resourceCode Has Been Setted
     *
     * @return boolean
     */
    final public boolean isResourceCodeSetted() {
        return this.resourceCodeSetted;
    }

    /**
     * Set resourceCode Null
     *
     */
    final public void setResourceCodeNull() {
        this.resourceCodeNull = true;
    }

    final public void setResourceCodeNull(boolean aNullFlag) {
        this.resourceCodeNull = aNullFlag;
    }

    final public boolean isResourceCodeNull() {
        return this.resourceCodeNull;
    }

    /**
         * Get resourceName
         *
         * @return String
         */
    final public String getResourceName() {
        if (isResourceNameNull()) {
            return null;
        } else {
            return StringUtils.trim(resourceName);
        }
    }

    /**
     * Set resourceName
     *
     * @param String
     */
    final public void setResourceName(String resourceName) {
        this.resourceName = StringUtils.trim(resourceName);

        this.resourceNameSetted = true;

        this.setResourceNameNull(this.resourceName == null);
    }

    /**
     * Get resourceName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isResourceNameSetted() {
        return this.resourceNameSetted;
    }

    /**
     * Set resourceName Null
     *
     */
    final public void setResourceNameNull() {
        this.resourceNameNull = true;
    }

    final public void setResourceNameNull(boolean aNullFlag) {
        this.resourceNameNull = aNullFlag;
    }

    final public boolean isResourceNameNull() {
        return this.resourceNameNull;
    }

    /**
         * Get resourceTypeId
         *
         * @return long
         */
    final public long getResourceTypeId() {
        return resourceTypeId;
    }

    /**
     * Set resourceTypeId
     *
     * @param long
     */
    final public void setResourceTypeId(long resourceTypeId) {
        this.resourceTypeId = resourceTypeId;

        this.resourceTypeIdSetted = true;

        this.setResourceTypeIdNull(false);
    }

    /**
     * Get resourceTypeId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isResourceTypeIdSetted() {
        return this.resourceTypeIdSetted;
    }

    /**
     * Set resourceTypeId Null
     *
     */
    final public void setResourceTypeIdNull() {
        this.resourceTypeIdNull = true;
    }

    final public void setResourceTypeIdNull(boolean aNullFlag) {
        this.resourceTypeIdNull = aNullFlag;
    }

    final public boolean isResourceTypeIdNull() {
        return this.resourceTypeIdNull;
    }

    /**
         * Get status
         *
         * @return String
         */
    final public String getStatus() {
        if (isStatusNull()) {
            return null;
        } else {
            return StringUtils.trim(status);
        }
    }

    /**
     * Set status
     *
     * @param String
     */
    final public void setStatus(String status) {
        this.status = StringUtils.trim(status);

        this.statusSetted = true;

        this.setStatusNull(this.status == null);
    }

    /**
     * Get status Has Been Setted
     *
     * @return boolean
     */
    final public boolean isStatusSetted() {
        return this.statusSetted;
    }

    /**
     * Set status Null
     *
     */
    final public void setStatusNull() {
        this.statusNull = true;
    }

    final public void setStatusNull(boolean aNullFlag) {
        this.statusNull = aNullFlag;
    }

    final public boolean isStatusNull() {
        return this.statusNull;
    }

    /**
         * Get sort
         *
         * @return int
         */
    final public int getSort() {
        return sort;
    }

    /**
     * Set sort
     *
     * @param int
     */
    final public void setSort(int sort) {
        this.sort = sort;

        this.sortSetted = true;

        this.setSortNull(false);
    }

    /**
     * Get sort Has Been Setted
     *
     * @return boolean
     */
    final public boolean isSortSetted() {
        return this.sortSetted;
    }

    /**
     * Set sort Null
     *
     */
    final public void setSortNull() {
        this.sortNull = true;
    }

    final public void setSortNull(boolean aNullFlag) {
        this.sortNull = aNullFlag;
    }

    final public boolean isSortNull() {
        return this.sortNull;
    }

    /**
         * Get resourceTitleKey
         *
         * @return String
         */
    final public String getResourceTitleKey() {
        if (isResourceTitleKeyNull()) {
            return null;
        } else {
            return StringUtils.trim(resourceTitleKey);
        }
    }

    /**
     * Set resourceTitleKey
     *
     * @param String
     */
    final public void setResourceTitleKey(String resourceTitleKey) {
        this.resourceTitleKey = StringUtils.trim(resourceTitleKey);

        this.resourceTitleKeySetted = true;

        this.setResourceTitleKeyNull(this.resourceTitleKey == null);
    }

    /**
     * Get resourceTitleKey Has Been Setted
     *
     * @return boolean
     */
    final public boolean isResourceTitleKeySetted() {
        return this.resourceTitleKeySetted;
    }

    /**
     * Set resourceTitleKey Null
     *
     */
    final public void setResourceTitleKeyNull() {
        this.resourceTitleKeyNull = true;
    }

    final public void setResourceTitleKeyNull(boolean aNullFlag) {
        this.resourceTitleKeyNull = aNullFlag;
    }

    final public boolean isResourceTitleKeyNull() {
        return this.resourceTitleKeyNull;
    }

    /**
         * Get domainTitleKey
         *
         * @return String
         */
    final public String getDomainTitleKey() {
        if (isDomainTitleKeyNull()) {
            return null;
        } else {
            return StringUtils.trim(domainTitleKey);
        }
    }

    /**
     * Set domainTitleKey
     *
     * @param String
     */
    final public void setDomainTitleKey(String domainTitleKey) {
        this.domainTitleKey = StringUtils.trim(domainTitleKey);

        this.domainTitleKeySetted = true;

        this.setDomainTitleKeyNull(this.domainTitleKey == null);
    }

    /**
     * Get domainTitleKey Has Been Setted
     *
     * @return boolean
     */
    final public boolean isDomainTitleKeySetted() {
        return this.domainTitleKeySetted;
    }

    /**
     * Set domainTitleKey Null
     *
     */
    final public void setDomainTitleKeyNull() {
        this.domainTitleKeyNull = true;
    }

    final public void setDomainTitleKeyNull(boolean aNullFlag) {
        this.domainTitleKeyNull = aNullFlag;
    }

    final public boolean isDomainTitleKeyNull() {
        return this.domainTitleKeyNull;
    }

    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = (prime * result) + (int) (getId() ^ (getId() >>> 32));

        return result;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if ((obj instanceof SysResource) == false) {
            return false;
        }

        SysResource other = (SysResource) obj;

        if (getId() != other.getId()) {
            return false;
        }

        return true;
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("id=");
        buffer.append(this.id);

        buffer.append("domainId=");
        buffer.append(this.domainId);

        buffer.append("parentResourceId=");
        buffer.append(this.parentResourceId);

        buffer.append("remarks=");
        buffer.append(this.remarks);

        buffer.append("resourceCode=");
        buffer.append(this.resourceCode);

        buffer.append("resourceName=");
        buffer.append(this.resourceName);

        buffer.append("resourceTypeId=");
        buffer.append(this.resourceTypeId);

        buffer.append("status=");
        buffer.append(this.status);

        buffer.append("sort=");
        buffer.append(this.sort);

        buffer.append("resourceTitleKey=");
        buffer.append(this.resourceTitleKey);

        buffer.append("domainTitleKey=");
        buffer.append(this.domainTitleKey);

        buffer.append("]");

        return buffer.toString();
    }
}
